package com.myapp.web.struts2.ui;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ui.AbstractClosingTag;

import com.myapp.web.struts2.components.SimpleUIBean;
import com.opensymphony.xwork2.util.ValueStack;

public class SimpleTag extends AbstractClosingTag {
	private static final long serialVersionUID = -2367804449685299960L;
	
	private String prefixClass;
	
    protected void populateParams() {
        super.populateParams();
        SimpleUIBean bean = (SimpleUIBean) component;
        bean.setPrefixClass(prefixClass);
    }   

	@Override
	public Component getBean(ValueStack stack, HttpServletRequest req,
			HttpServletResponse res) {
		return new SimpleUIBean(stack, req, res);
	}
	
	public void setPrefixClass(String prefixClass) {
		this.prefixClass = prefixClass;
	}    
}
